how to get each digit of a number

39

int number; // = some int

while (number > 0) {
    print( number % 10);
    number = number / 10;
}

Comments

Submit
0 Comments